<template>
  <el-table :data="rolesList" border stripe>

    <!-- 索引列 -->
    <el-table-column type="index"></el-table-column>
    <el-table-column prop="realName" label="农户姓名"></el-table-column>
    <el-table-column prop="roleDesc" label="身份证号"></el-table-column>
    <el-table-column prop="gender" label="性别"></el-table-column>
    <el-table-column prop="type" label="状态" ></el-table-column>
  </el-table>
</template>

<script>

  export default {
    name: "RoleTable",
    props: {
      rolesList: {
        type: Array,
        default() {
          return []
        }
      }
    },
    methods: {
      // 监听子组件中发出的事件，重新获取角色列表
      updateRoleList() {
        this.$emit('role-list');
      }
    }
  }
</script>

<style scoped>

</style>
